/*****************************************************************************

File:   QuiltDatasSurfaceRev.java

Date          Build     Author        Version    Comments
27-Dec-12    P-20-20    dshah          $$1        Created

****************************************************************************/
package com.ptc.otkjavaexamples;
import com.ptc.pfc.pfcGeometry.*;
import com.ptc.cipjava.*;
import com.ptc.pfc.pfcSession.*;
import com.ptc.pfc.pfcCommand.*;
import com.ptc.pfc.pfcGlobal.*;
import com.ptc.pfc.pfcModel.*;
import com.ptc.pfc.pfcModelItem.*;
import com.ptc.pfc.pfcFeature.*;
import com.ptc.pfc.pfcSolid.*;
import java.io.*;

import com.ptc.pfc.pfcFamily.*;
import com.ptc.pfc.pfcServer.*;
import com.ptc.pfc.pfcWindow.*;
import com.ptc.wfc.wfcSolid.*;
import com.ptc.pfc.pfcBase.*;
import com.ptc.wfc.wfcModel.*;
import com.ptc.wfc.wfcGeometry.*;
import com.ptc.wfc.wfcSolid.*;
import com.ptc.wfc.wfcPart.*;
import com.ptc.pfc.pfcPart.*;
import com.ptc.pfc.pfcDimension.*;
import com.ptc.pfc.pfcAssembly.*;
import com.ptc.pfc.pfcSelect.*;
import com.ptc.pfc.pfcUnits.*;
import com.ptc.pfc.pfcObject.*;
import com.ptc.pfc.pfcUI.*;
import com.ptc.pfc.pfcRelations.*;
import com.ptc.pfc.pfcDetail.*;
import com.ptc.pfc.pfcDrawing.*;
import com.ptc.pfc.pfcView.*;
import com.ptc.pfc.pfcView2D.*;
import com.ptc.pfc.pfcModel2D.*;

class QuiltDatasSurfaceRev
{

	public QuiltDatasSurfaceRev()
	{
	}

	public static QuiltDatas OtkUtilQuiltDatasCreate()
	{
		try
		{
 	 QuiltDatas wQuiltDatas = QuiltDatas.create();
		int[] nums;
		WSurfaceDescriptors WQSurfaceDescs1 = WSurfaceDescriptors.create();

		ContourDescriptors WQS1_ContDescs1 = ContourDescriptors.create();
		intseq WQS1_EdgeIds1 = intseq.create();

		nums = new int [4];
		nums[0] = 44;
		nums[1] = 50;
		nums[2] = 47;
		nums[3] = 52;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WQS1_EdgeIds1, 4, nums);
		ContourDescriptor WQS1_ContDesc1 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WQS1_EdgeIds1);
		WQS1_ContDescs1.append(WQS1_ContDesc1);

		// SURFACE_REVOLVED
		Vector3D  WQS1_XAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , -6.123233995736766E-17 , 0.0 );
		Vector3D  WQS1_YAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , -1.0 );
		Vector3D  WQS1_ZAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 6.123233995736766E-17 , 1.0 , 0.0 );
		Point3D  WQS1_origin1 = otkCreateIntfDataUtils.CreatePfcPoint3D( -1.2396481206584368E-14 , -202.44990172211743 , 0.0 );
		Matrix3D  WQS1_MatrixD1 = otkCreateIntfDataUtils.CreatePfcMatrix3D(1.0,-6.123233995736766E-17,0.0,0.0,0.0,0.0,-1.0,0.0,6.123233995736766E-17,1.0,0.0,0.0,-1.2396481206584368E-14,-202.44990172211743,0.0,1.0); 
		Transform3D   WQS1_TransformD1 = pfcBase.Transform3D_Create(WQS1_MatrixD1);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WQS1_XAxis1, WQS1_YAxis1,WQS1_ZAxis1, WQS1_origin1, WQS1_TransformD1);


		UVParams  WQS1_UVParam11 = otkCreateIntfDataUtils.CreatePfcUVParams(-2.670353755551324, -0.00916023983503929);
		UVParams  WQS1_UVParam21 = otkCreateIntfDataUtils.CreatePfcUVParams(0.05235987755982989, 1.0088823823782587);
		UVOutline  WQS1_UVOutline1 = otkCreateIntfDataUtils.CreatePfcUVOutline(WQS1_UVParam11, WQS1_UVParam21);
		SurfaceExtents  WQS1_SurfaceExtents1 = pfcGeometry.SurfaceExtents_Create (WQS1_UVOutline1);
		// type : CURVE_SPLINE
		SplinePoints  SDRSplPoints1 = SplinePoints.create();
		Point3D  SDRPoint1_1 = otkCreateIntfDataUtils.CreatePfcPoint3D( 214.54228506197404 , 0.0 , 442.3471841095976);
		Vector3D  SDRVector1_1 = otkCreateIntfDataUtils.CreatePfcVector3D( 0.44877634856502474 , 0.0 , -1.0017130199154298);
		otkCreateIntfDataUtils.CreatePfcSplinePoints((double)0.0, SDRPoint1_1, SDRVector1_1, SDRSplPoints1);
		Point3D  SDRPoint1_2 = otkCreateIntfDataUtils.CreatePfcPoint3D( 229.36520657534686 , 0.0 , 312.8416593085515);
		Vector3D  SDRVector1_2 = otkCreateIntfDataUtils.CreatePfcVector3D( -0.13067400331061393 , 0.0 , -0.9868304541709859);
		otkCreateIntfDataUtils.CreatePfcSplinePoints((double)130.35106426947948, SDRPoint1_2, SDRVector1_2, SDRSplPoints1);
		Point3D  SDRPoint1_3 = otkCreateIntfDataUtils.CreatePfcPoint3D( 200.499517312463 , 0.0 , 159.15136782779174);
		Vector3D  SDRVector1_3 = otkCreateIntfDataUtils.CreatePfcVector3D( -0.10801142973321287 , 0.0 , -0.9809837542351766);
		otkCreateIntfDataUtils.CreatePfcSplinePoints((double)286.7286000988379, SDRPoint1_3, SDRVector1_3, SDRSplPoints1);
		Point3D  SDRPoint1_4 = otkCreateIntfDataUtils.CreatePfcPoint3D( 226.2445915199 , 0.0 , 21.064151624266543);
		Vector3D  SDRVector1_4 = otkCreateIntfDataUtils.CreatePfcVector3D( 0.5798666512370236 , 0.0 , -0.986898123766579);
		otkCreateIntfDataUtils.CreatePfcSplinePoints((double)427.1952798659113, SDRPoint1_4, SDRVector1_4, SDRSplPoints1);
		SplineDescriptor  SDRsplineDesc1 = pfcGeometry.SplineDescriptor_Create(SDRSplPoints1);
		CurveDescriptor  SDRCurveDesc1 = (CurveDescriptor)(SDRsplineDesc1);

		WRevolvedSurfaceDescriptor  WQS1_RevSurfDesc1 = wfcGeometry.WRevolvedSurfaceDescriptor_Create(WQS1_SurfaceExtents1, SurfaceOrientation.SURFACEORIENT_INWARD, WQS1_TransformD1, SDRCurveDesc1, 49, WQS1_ContDescs1); 


		WSurfaceDescriptor  WQS1_SurfDesc1 = (WSurfaceDescriptor)(WQS1_RevSurfDesc1);


		WQSurfaceDescs1.append(WQS1_SurfDesc1);



		QuiltData WQuiltData1 = wfcGeometry.QuiltData_Create(WQSurfaceDescs1, 59);
		wQuiltDatas.append(WQuiltData1);


		return(wQuiltDatas);
		}
		catch (Exception e)
		{
		System.out.println(e);
		}
		return null;
	}
};
